package pe.edu.upc.dsd.whereeat.base.service;

import java.io.Serializable;
import java.util.List;

import pe.edu.upc.dsd.whereeat.base.domain.BaseEntity;


public interface BaseService<T extends BaseEntity, ID extends Serializable> {

	void save(T entity) throws Exception;

	void update(T entity) throws Exception;

	void delete(T entity) throws Exception;

	T findById(ID id) throws Exception;

	List<T> findAll() throws Exception;

	T findSingleObject(String queryString, Object... params)
			throws Exception;

	List<T> executeQuery(String queryString, Integer startPosition,
			Integer maxResult, Object... params)
			throws Exception;

}
